#include "ordermgr.h"
#include "util.h"
#include <sstream>
#include "global.h"
#include "minutelisten.h"


OrderMgr::OrderMgr()
{
    MinuteListen::Instance()->Register(__FUNCTION__, [this](std::int64_t tick){
        if (0 != (tick % 60)) return;
        m_mgr.OnTick();
    });
}
OrderMgr::~OrderMgr()
{
}

stOrder* OrderMgr::Get(const std::string& cycle, bool force)
{
    if (force)
    {
        return m_mgr.ForceGet(cycle, true);
    }
    else
    {
        return m_mgr.ActiveGet(cycle);
    }
}








